<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the enableCameraAutoFocus method from the TXDeviceManager class, for the Dart programming language.">
  <title>enableCameraAutoFocus method - TXDeviceManager class - tx_device_manager library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  
  <link rel="stylesheet" href="../../static-assets/github.css?v1">
  <link rel="stylesheet" href="../../static-assets/styles.css?v1">
  <link rel="icon" href="../../static-assets/favicon.png?v1">

  
</head>


<body data-base-href="../../"
      data-using-base-href="false">

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../../index.html">tencent_trtc_cloud</a></li>
    <li><a href="../../tx_device_manager/tx_device_manager-library.html">tx_device_manager</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager-class.html">TXDeviceManager</a></li>
    <li class="self-crumb">enableCameraAutoFocus method</li>
  </ol>
  <div class="self-name">enableCameraAutoFocus</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>


  <div id="dartdoc-main-content" class="main-content">
      <div>
<h1><span class="kind-method">enableCameraAutoFocus</span> method 
    <a href="https://dart.dev/null-safety" class="feature feature-null-safety" title="Supports the null safety language feature.">Null safety</a>
</h1></div>

    <section class="multi-line-signature">
      

<span class="returntype"><a href="https://api.flutter.dev/flutter/dart-async/Future-class.html">Future</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="https://api.flutter.dev/flutter/dart-core/int-class.html">int</a>?</span>&gt;</span></span>
<span class="name ">enableCameraAutoFocus</span>(<wbr><ol class="parameter-list"><li><span class="parameter" id="enableCameraAutoFocus-param-enable"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/bool-class.html">bool</a></span> <span class="parameter-name">enable</span></span></li>
</ol>)

      

    </section>
    
<section class="desc markdown">
  <p>设置是否自动识别人脸位置</p>
<p>注意：此接口只支持和Android和iOS平台</p>
<p>参数：</p>
<p>enable true：开启；false：关闭，默认值：true</p>
<p>返回值：0：操作成功 负数：失败</p>
</section>


    
<section class="summary source-code" id="source">
  <h2><span>Implementation</span></h2>
  <pre class="language-dart"><code class="language-dart">Future&lt;int?&gt; enableCameraAutoFocus(bool enable) {
  return _channel.invokeMethod(&#39;enableCameraAutoFocus&#39;, {
    &quot;enable&quot;: enable,
  });
}</code></pre>
</section>


  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
  <li><a href="../../index.html">tencent_trtc_cloud</a></li>
  <li><a href="../../tx_device_manager/tx_device_manager-library.html">tx_device_manager</a></li>
  <li><a href="../../tx_device_manager/TXDeviceManager-class.html">TXDeviceManager</a></li>
  <li class="self-crumb">enableCameraAutoFocus method</li>
</ol>


    <h5>TXDeviceManager class</h5>
    <ol>

    <li class="section-title"><a href="../../tx_device_manager/TXDeviceManager-class.html#constructors">Constructors</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/TXDeviceManager.html">TXDeviceManager</a></li>


    <li class="section-title inherited">
      <a href="../../tx_device_manager/TXDeviceManager-class.html#instance-properties">Properties</a>
    </li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/hashCode.html">hashCode</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/runtimeType.html">runtimeType</a></li>

    <li class="section-title"><a href="../../tx_device_manager/TXDeviceManager-class.html#instance-methods">Methods</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/enableCameraAutoFocus.html">enableCameraAutoFocus</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/enableCameraTorch.html">enableCameraTorch</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/getApplicationMuteState.html">getApplicationMuteState</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/getApplicationPlayVolume.html">getApplicationPlayVolume</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/getCameraZoomMaxRatio.html">getCameraZoomMaxRatio</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/getCurrentDevice.html">getCurrentDevice</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/getCurrentDeviceMute.html">getCurrentDeviceMute</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/getCurrentDeviceVolume.html">getCurrentDeviceVolume</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/getDevicesList.html">getDevicesList</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/isAutoFocusEnabled.html">isAutoFocusEnabled</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/isFrontCamera.html">isFrontCamera</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/noSuchMethod.html">noSuchMethod</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/setApplicationMuteState.html">setApplicationMuteState</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/setApplicationPlayVolume.html">setApplicationPlayVolume</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/setAudioRoute.html">setAudioRoute</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/setCameraFocusPosition.html">setCameraFocusPosition</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/setCameraZoomRatio.html">setCameraZoomRatio</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/setCurrentDevice.html">setCurrentDevice</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/setCurrentDeviceMute.html">setCurrentDeviceMute</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/setCurrentDeviceVolume.html">setCurrentDeviceVolume</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/setSystemVolumeType.html">setSystemVolumeType</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/startMicDeviceTest.html">startMicDeviceTest</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/startSpeakerDeviceTest.html">startSpeakerDeviceTest</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/stopMicDeviceTest.html">stopMicDeviceTest</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/stopSpeakerDeviceTest.html">stopSpeakerDeviceTest</a></li>
    <li><a href="../../tx_device_manager/TXDeviceManager/switchCamera.html">switchCamera</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/toString.html">toString</a></li>

    <li class="section-title inherited"><a href="../../tx_device_manager/TXDeviceManager-class.html#operators">Operators</a></li>
    <li class="inherited"><a href="https://api.flutter.dev/flutter/dart-core/Object/operator_equals.html">operator ==</a></li>




</ol>

  </div><!--/.sidebar-offcanvas-->

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    tencent_trtc_cloud
      1.2.4
  </span>

  
</footer>



<script src="../../static-assets/highlight.pack.js?v1"></script>
<script src="../../static-assets/script.js?v1"></script>



</body>

</html>

